//package com.example.testi18n.job;
//
//import com.google.common.util.concurrent.ThreadFactoryBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.concurrent.Executor;
//import java.util.concurrent.Executors;
//import java.util.concurrent.ThreadFactory;
///**
// * 创建定时任务线程
// */
//@Configuration
//public class TaskSchedulingThreadFactory {
//
//    @Bean
//    public Executor taskScheduler() {
//        // 设置线程名称
//        ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("demo-pool-%d").build();
//        // 创建线程池
//        return Executors.newScheduledThreadPool(5, namedThreadFactory);
//    }
//}
